package com.glsc.ngateway.opmanage.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class DigitalKeyFeesItemDto implements Serializable {
    private static final long serialVersionUID = 1103640900864826689L;


    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "数字证书信息年费主表id")
    private String digitalFeesId;

    @ApiModelProperty(value = "交易单元号")
    private String unit;

    @ApiModelProperty(value = "分摊比率")
    private BigDecimal rate;

    @ApiModelProperty(value = "分摊费用")
    private BigDecimal broFare;

    @ApiModelProperty(value = "内部编码")
    private String brnOrgNo;

    @ApiModelProperty(value = "营业部名称")
    private String brnOrgNm;

    @ApiModelProperty(value = "营业部所属分公司编码")
    private String compOrgNo;

    @ApiModelProperty(value = "营业部所属分公司名称")
    private String compOrgNm;

    @ApiModelProperty(value = "计费年度 格式：yyyy-MM-dd")
    private String annualFeeDate;

    @ApiModelProperty(value = "交易所：sh 上海 sz深圳")
    private String tradingPost;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "操作时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime opTime;
}
